package kr.co.mcshop.qnacomment;

import java.util.ArrayList;
import java.util.Map;

import org.apache.ibatis.session.SqlSession;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Component;

@Component
public class QnACommentService {

	@Autowired
	private SqlSession sqlSession;

	public ArrayList<QnAComment> selectqnacomment(Map map) {
		QnACommentMapper mapper = sqlSession.getMapper(QnACommentMapper.class);
		return mapper.selectqnacomment(map);
	}

	public int qnacommentInsert(Map map) {
		QnACommentMapper mapper = sqlSession.getMapper(QnACommentMapper.class);
		return mapper.qnacommentInsert(map);
	}
	public int updateqnacomment(Map map) {
		QnACommentMapper mapper = sqlSession.getMapper(QnACommentMapper.class);
		return mapper.updateqnacomment(map);
	}

	public int qnacommentDelete(Map map){
		QnACommentMapper mapper = sqlSession.getMapper(QnACommentMapper.class);
		return mapper.qnacommentDelete(map);
	}
	public int faqcommentDelete(Map map){
		QnACommentMapper mapper = sqlSession.getMapper(QnACommentMapper.class);
		return mapper.faqcommentDelete(map);
	}
	public int FAQcommentDelete(Map map){
		QnACommentMapper mapper = sqlSession.getMapper(QnACommentMapper.class);
		return mapper.FAQcommentDelete(map);
	}
}
